/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.myapp.struts.action;

import com.myapp.bo.WantEsBO;
import com.myapp.dbdao.WantEsDBDAO;
import com.myapp.struts.form.WantEstimateForm;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 *
 * @author toint
 */
public class RedirectAddWantEs5bAction extends Action {
    public ActionForward execute(ActionMapping mapping, ActionForm form, 
            HttpServletRequest req, HttpServletResponse res) throws Exception {
        WantEstimateForm frm = (WantEstimateForm) form;
        List<WantEsBO> lstWantEs = WantEsDBDAO.lstWants(2);
        req.setAttribute("lstWant", lstWantEs);
        frm.setType(2);
        return mapping.findForward("addWantEs");
    }
}
